﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ConsoleControl;

namespace test
{
    public partial class Form1 : Form
    {
        ProccessControler ctrl;
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            string[] arraycmd = textBox1.Text.Split(' ');
            string args = "";
            if (arraycmd.Count() > 1)
                foreach (string ar in arraycmd)
                    args += ar + " ";

                ctrl = new ProccessControler(arraycmd[0], args, richTextBox1);
                ctrl.RunApp();
        }
    }
}
